import {Base} from 'base.js'

class Book extends Base{
  constructor(){
    super()
  }

  getBookDetail(id,callback){
    var params = {
      url: 'book/'+id,
      fn:function (res) {
        callback && callback(res)
      }
    }
    this.request(params)
  }

  toBookDetailPage(id){
    wx.navigateTo({
      url: '/pages/book/book?id=' + id
    })
  }
}

export {Book}